package com.lineage.server.model.skill.skillmode;

import com.lineage.server.model.Instance.L1NpcInstance;
import com.lineage.server.model.Instance.L1PcInstance;
import com.lineage.server.model.L1Character;
import com.lineage.server.model.L1Magic;
import com.lineage.server.serverpackets.S_PacketBoxDk;
import com.lineage.server.serverpackets.S_SkillSound;
import com.lineage.server.serverpackets.ServerBasePacket;

public class FOE_SLAYER extends SkillMode {
  public int start(L1PcInstance srcpc, L1Character cha, L1Magic magic, int integer) throws Exception {
    int dmg = 0;
    srcpc.setFoeSlayer(true);
    int i = 0;
    while (i < 3) {
      cha.onAction(srcpc);
      if (i == 2) {
        srcpc.setFoeSlayer(false);
        srcpc.set_weaknss(0, 0L);
        srcpc.sendPackets((ServerBasePacket)new S_PacketBoxDk(0));
      } 
      i++;
    } 
    srcpc.sendPacketsAll((ServerBasePacket)new S_SkillSound(srcpc.getId(), 7020));
    srcpc.sendPacketsAll((ServerBasePacket)new S_SkillSound(cha.getId(), 12119));
    return 0;
  }
  
  public int start(L1NpcInstance npc, L1Character cha, L1Magic magic, int integer) throws Exception {
    int dmg = 0;
    int i = 0;
    while (i < 3) {
      npc.attackTarget(cha);
      i++;
    } 
    npc.broadcastPacketAll((ServerBasePacket)new S_SkillSound(cha.getId(), 7020));
    npc.broadcastPacketAll((ServerBasePacket)new S_SkillSound(cha.getId(), 12119));
    return 0;
  }
  
  public void start(L1PcInstance srcpc, Object obj) throws Exception {}
  
  public void stop(L1Character cha) throws Exception {}
}
